package com.example.waitdemo.pojo;

import com.example.waitdemo.config.NotNotNull;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * TODO
 *
 * @ClassName User
 * @Author xiaojiang
 * @Date 2022/2/7 下午 12:23
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Component
// 指定前缀  (小写)
@ConfigurationProperties(prefix = "usertest")
public class UserProperty {

    @NotNotNull(message = "name is null")
    private String name;
    private Integer age;
    @NotNotNull(message = "qq is null")
    private Integer qq;


}
